package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Address;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AddressDao {
    void add(Address address);

    void deleteById(Integer id);

    //查询中间表中是否有关联数据
    long selectCountByAddressId(Integer id);

    //根据查询条件分页
    Page<Address> findByCondition(String queryString);

    Address findById(Integer id);

    void edit(Address address);

    List<Address> findAll();

    Integer findIdByAddress(String address);


    void addByOrderId(@Param("address_id") Integer address_id,@Param("order_id") Integer order_id);

    String findAddressById(Integer addressId);
}